home *** CD-ROM | disk | FTP | other *** search
- /* NAME:
- ICeTEe AddrsTable.c
-
- WRITTEN BY:
- Michael Schürig
-
- DESCRIPTION:
- This file contains a a code resource that acts as a Gestalt Selector
- function to be installed as an address table. When called, it will
- return the address of its internal address table.
-
- ___________________________________________________________________________
- */
- //=============================================================================
- // Include files
- //-----------------------------------------------------------------------------
- #include "A4Stuff.h"
- #include "SetupA4.h"
- #include "ICeTEe AddrsTable.h"
-
-
- //=============================================================================
- // Function prototypes
- //-----------------------------------------------------------------------------
- pascal OSErr main(OSType theSelector, long *theResponse);
-
-
- //=============================================================================
- // Global variables
- //-----------------------------------------------------------------------------
- ICeTEeAddressTable gTheAddressTable;
-
-
- //=============================================================================
- // main : Entry point to our Gestalt Selector function.
- //-----------------------------------------------------------------------------
- // Note : When called, we return the address of our address table
- // structure.
- //-----------------------------------------------------------------------------
- pascal OSErr main(OSType theSelector, long *theResponse)
- {
- long oldA4;
- #pragma unused(theSelector)
-
- // Set up A4 to access our globals
- #ifndef powerc
- oldA4 = SetCurrentA4();
- #endif
-
- #if qDebug >= 3
- DebugStr("\pAddress Table entered");
- #endif
-
- // Return the address of gTheAddressTable. We treat theResponse as a pointer
- // to a variable that's a pointer to an address table, and write to it
- // accordingly.
- *theResponse = (long) &gTheAddressTable;
-
- #if qDebug >= 3
- DebugStr("\pAddress Table exit");
- #endif
-
- // Restore A4 and return
- #ifndef powerc
- SetA4(oldA4);
- #endif
- return(noErr);
- }
-